home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / plnk081.zip / pilot-link.0.8.1 / Java / Pdapilot / mail / Record.java < prev    next >
Encoding:
Java Source  |  1997-08-03  |  1.5 KB  |  47 lines

  1.  
  2. package Pdapilot.mail;
  3.  
  4. import java.io.*;
  5.  
  6. /** A representation of a mail database record.
  7.  */
  8.  
  9. public class Record extends Pdapilot.Record {
  10.  
  11.         public boolean read, signature, confirmRead, confirmDelivery;
  12.         public int priority, addressing;
  13.         
  14.         public java.util.Date date;
  15.         public String subject, from, to, cc, bcc, replyTo, sentTo, body;
  16.         
  17.         public Record() {
  18.             super();
  19.         }
  20.         
  21.         public Record(byte[] contents, Pdapilot.RecordID id, int index, int attr, int cat) {
  22.             super(contents, id, index, attr, cat);
  23.         }
  24.         
  25.         public native void unpack(byte[] data);
  26.         public native byte[] pack();
  27.                 
  28.         public void fill() {
  29.         }
  30.         
  31.         public String describe() {
  32.             StringBuffer c = new StringBuffer("read=");
  33.           return "read="+read+", signature="+signature+", confirmRead="+confirmRead+
  34.                  ", confirmDelivery="+confirmDelivery+", priority="+priority+
  35.                  ", addressing="+addressing+", date="+((date == null)?"<Null":date.toString())+
  36.                  ", from="+Pdapilot.Util.prettyPrint(from)+
  37.                  ", to="+Pdapilot.Util.prettyPrint(to)+
  38.                  ", cc="+Pdapilot.Util.prettyPrint(cc)+
  39.                  ", bcc="+Pdapilot.Util.prettyPrint(bcc)+
  40.                  ", replyTo="+Pdapilot.Util.prettyPrint(replyTo)+
  41.                  ", sentTo="+Pdapilot.Util.prettyPrint(sentTo)+
  42.                  ", body="+Pdapilot.Util.prettyPrint(body)+
  43.                  ", subject="+Pdapilot.Util.prettyPrint(subject)+
  44.                  ", "+super.describe();
  45.         }
  46. }
  47.